package com.itxiaosu.pojo.base.specific;

import com.itxiaosu.constants.FruitConstants;
import com.itxiaosu.pojo.base.Fruit;
import com.itxiaosu.strategy.DiscountStrategy;

// 香蕉类，继承Fruit
public class Banana extends Fruit {

    public Banana(DiscountStrategy discountStrategy) {
        super("Banana", FruitConstants.BANANA_PRICE, discountStrategy);
    }

    @Override
    public double calculateTotal(int quantity) {
        return discountStrategy.discountType(price * quantity);
    }
}
